package zheezes.swt.databinding;

final class IdentityWrapper {
	private final Object object;

	public IdentityWrapper(Object object) {
		this.object = object;
	}

	public Object unwrap() {
		return object;
	}

	@Override
	public int hashCode() {
		return System.identityHashCode(object);
	}
	
	@Override
	public boolean equals(Object othre) {
		if (othre == null || othre.getClass() != IdentityWrapper.class) {
			return false;
		}
		IdentityWrapper wrapper = (IdentityWrapper) othre;
		return object == wrapper.object;
	}
}